
function [w] = perco(X, t, maxEpoches)
g = 1;  % Lernrate
w = rand(1, size(t,1));
w = w';

for i = 1 : maxEpoches
   for j = 1 : length(X(1, :))
       if (w' * (t(j) * X(:, j)) <= 0) % Klassenzuordnung wenn 
           w = w + ((t(j) * X(:, j)) * g);
       end;
   end;
end;